<!DOCTYPE html>
<html>
{include file='/common/_meta'}
<body>
	<!-- 头部 -->
{include file='/common/top'}
	<!-- /头部 -->
	
	<div class="main-container container-fluid">
		<div class="page-container">
			            <!-- Page Sidebar -->
        {include file='/common/left'}
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <a href="{:url('Index/index')}">系统</a>
                        </li>
                                            <li>
                            <a href="{:url('cates/lst')}">商品分类管理</a>
                        </li>
                        <li class="active">编辑商品分类</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->

                <!-- Page Body -->
                <div class="page-body">
                    
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget">
            <div class="widget-header bordered-bottom bordered-blue">
                <span class="widget-caption">编辑商品分类</span>
            </div>
            <div class="widget-body">
                <div id="horizontal-form">
                    <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="cates_id" value="{$catess.cates_id}">
                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">上级分类</label>
                            <div class="col-sm-6">
                                <select name="cates_pid">



                                    {volist name="cateslist" id="cates"}
                                    <option style="display: none;">{$catess.cates_name}</option>
                                    
                                    <option {if condition="$cates['cates_id'] eq $catess['cates_id']"}
                                            disabled="disabled"
                                            {/if}
                                            {if condition="$cates['cates_id'] eq $catess['cates_pid']"}
                                            selected="selected" value="{$catess.cates_id}" disabled="disabled"
                                            {/if}
                                            {if condition="$cates['cates_id'] eq $catess['cates_id'] and $cates['cates_id'] eq 0"}
                                            selected="selected" value="{$catess.cates_id}" disabled="disabled"
                                            {/if}>
                                    {if condition="$cates['cates_pid'] neq 0"}
                                     |
                                    {/if}
                                        <?php echo str_repeat('♥',$cates['lever']*5); ?>

                                    {if condition="$catess['cates_pid'] eq 0 and $catess['cates_name'] eq $cates['cates_name']"} 
                                        {$catess.cates_name}
                                    {else /}
                                        {$cates.cates_name}
                                    {/if}
                                    </option>
                                    {/volist}


                                </select>
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                        </div>


                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">商品分类名称</label>
                            <div class="col-sm-6">
                                <input class="form-control" id="username" placeholder="" name="cates_name" type="text" required="" value="{$catess.cates_name}" >
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                        </div>




                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">商品分类关键词</label>
                            <div class="col-sm-6">
                                <input class="form-control" id="username" placeholder="" name="cates_keywords" value="{$catess.cates_keywords}" type="text">
                            </div>
                            <p class="help-block col-sm-4 red"></p>
                        </div>


                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">商品分类描述</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" id="username" placeholder="" name="cates_description" value="{$catess.cates_description}" type="text"></textarea>
                            </div>
                            <p class="help-block col-sm-4 red"></p>
                        </div>


                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">商品分类图片</label>
                            <div class="col-sm-6">
                                <input class="" id="username" name="cates_img" type="file" value="{$cates.cates_img}"> {if condition="$cates['cates_img'] neq ''"}
                                    <img src="__upload__/{$cates.cates_img}" style="height: 30px">
                                {else/}
                                    暂无图片
                                {/if}
                            </div>
                        </div>


                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">显示导航</label>
                            <div class="col-sm-6">
                                <div class="radio" style="float:left; padding-right: 10px;">
                                    <label>
                                        <input class="inverted colored-blue" checked="checked" value="1" name="cates_shownav" type="radio" {if condition="$catess['cates_shownav'] eq 1"} checked="checked" {/if}>
                                        <span class="text">是</span>
                                    </label>
                                </div>
                                <div class="radio" style="float:left">
                                    <label>
                                        <input class="inverted colored-blue" value="0" name="cates_shownav" type="radio" {if condition="$catess['cates_shownav'] eq 0"} checked="checked" {/if}>
                                        <span class="text">否</span>
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">保存信息</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>

	    <!--Basic Scripts-->
    {include file='/common/footer'}
    

</body></html>